<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>充值VIP_资源共享平台</title>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
    <link rel="stylesheet" href="/css/style.css"/>
</head>
<body>
<div th:include="common/header" class="header-wrapper"></div>
<div class="container-wrapper">
    <div class="data-list">
        <div class="data-list-title">
            <i class="layui-icon layui-icon-rate-solid"></i>
            <span class="head">微信扫码支付充值</span>
        </div>
        <div style="padding: 10px;line-height: 40px">
            <table>
                <tr>
                    <td>商品名称：</td>
                    <td>
                        资源共享平台VIP会员
                    </td>
                </tr>
                <tr>
                    <td>商品描述：</td>
                    <td>
                        尊贵资源共享平台VIP会员 你值得拥有！
                    </td>
                </tr>
                <tr>
                    <td>交易金额：</td>
                    <td th:inline="text">
                        [[${vipMoney}]](元)
                    </td>
                </tr>
            </table>
            <img th:src="'/wechatPay/loadPayImage?orderNo='+${orderNo}" />
        </div>
    </div>
</div>
<div th:include="common/link" class="wrapper"></div>
<div th:include="common/footer" class="footer-wrapper"></div>
<script src="/layui/layui.js"></script>
<script src="/js/common.js"></script>
<script type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
    let $, layer;
    layui.use(['layer', 'element'], function () {
        $ = layui.jquery,
            layer = layui.layer;
    });

    function queryPayStatus() {
        $.post("/wechatPay/queryPayStatus", {
                orderNo: [[${orderNo}]]
            },
            function (data, status) {
                if (data == true) {
                    location.href = "/wechatPay/payResult";
                }
            });
    }

    setInterval("queryPayStatus()", 3000);
    /*]]>*/
</script>
</body>
</html>